/* This program runs the analysis to create Table 6
   and Appendix Tables A6 and A7.

*/

clear
clear matrix
clear mata
capture log close
set more off


log using "reg_geog_lbd_brdis_mylog.log", replace



use ${output_data}lbd_brdis_innovindex.dta, clear


label var z "Innovation Index"
label var univ "Indicator: University County"


***************
*** Table 6 ***
***************

* Panel A
areg pwuniindexcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwuniindexcntfs1 z i.numnaics, abs(fips) vce(cluster fips)
areg pwuniindexcntfs2 z i.numnaics, abs(fips) vce(cluster fips)
areg pwuniindexcntfs3 z i.numnaics, abs(fips) vce(cluster fips)
areg pwuniindexcntfs4 z i.numnaics, abs(fips) vce(cluster fips)

areg pwpre80uniindexcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80uniindexcntfs1 z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80uniindexcntfs2 z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80uniindexcntfs3 z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80uniindexcntfs4 z i.numnaics, abs(fips) vce(cluster fips)

* Panel B
areg pwpost80issue z i.numnaics, abs(fips) vce(cluster fips)
areg pwinovacntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwipcdcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwipefcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwiphicntfsall z i.numnaics, abs(fips) vce(cluster fips)

areg pwpre80issue z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80inovacntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80ipcdcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80ipefcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80iphicntfsall z i.numnaics, abs(fips) vce(cluster fips)

*******************
*** END Table 6 ***
*******************


*************************
*** Appendix Table A6 ***
*************************

* Panel A
areg pwuniindexcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwuniindexcntfs1 z i.numnaics, abs(fips) vce(cluster fips)
areg pwuniindexcntfs2 z i.numnaics, abs(fips) vce(cluster fips)
areg pwuniindexcntfs3 z i.numnaics, abs(fips) vce(cluster fips)
areg pwuniindexcntfs4 z i.numnaics, abs(fips) vce(cluster fips)

areg pwpre80uniindexcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80uniindexcntfs1 z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80uniindexcntfs2 z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80uniindexcntfs3 z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80uniindexcntfs4 z i.numnaics, abs(fips) vce(cluster fips)

* Panel B
areg pwprofecntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwintpphdcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwvisitcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwcomercntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwusunicntfsall z i.numnaics, abs(fips) vce(cluster fips)

areg pwpre80profecntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80intpphdcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80visitcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80comercntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80usunicntfsall z i.numnaics, abs(fips) vce(cluster fips)


*****************************
*** END Appendix Table A6 ***
*****************************

*************************
*** Appendix Table A7 ***
*************************

* Panel A
areg pwipcdcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwipefcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwiphicntfsall z i.numnaics, abs(fips) vce(cluster fips)

areg pwpre80ipcdcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80ipefcntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80iphicntfsall z i.numnaics, abs(fips) vce(cluster fips)


* Panel B
areg pwpost80apply z i.numnaics, abs(fips) vce(cluster fips)
areg pwpost80issue z i.numnaics, abs(fips) vce(cluster fips)
areg pwinovacntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwinovbecntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwinovcdcntfsall z i.numnaics, abs(fips) vce(cluster fips)

areg pwpre80apply z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80issue z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80inovacntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80inovbecntfsall z i.numnaics, abs(fips) vce(cluster fips)
areg pwpre80inovcdcntfsall z i.numnaics, abs(fips) vce(cluster fips)

*****************************
*** END Appendix Table A7 ***
*****************************




log close










